package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class CancelButton implements Sequenceable, Serializable {
    @SerializedName("buttonRenderer")
    private ButtonRenderer buttonRenderer;


    public static final Sequenceable.Producer<CancelButton> CREATOR = new Producer<CancelButton>() {
        @Override
        public CancelButton createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            CancelButton cancelButton = new CancelButton();
            cancelButton.unmarshalling(parcel);
            return cancelButton;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.buttonRenderer);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.buttonRenderer);
        return true;
    }

    @Override
    public String toString() {
        return "CancelButton{" +
                "buttonRenderer = '" + buttonRenderer + '\'' +
                "}";
    }

    public ButtonRenderer getButtonRenderer() {
        return buttonRenderer;
    }

    public void setButtonRenderer(ButtonRenderer buttonRenderer) {
        this.buttonRenderer = buttonRenderer;
    }
}
